﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OUnsuitableProdSupper.aspx.cs" Inherits="IHISCETeim.Web.MachineSys.MacModel.OUnsuitableProdSupper" %>
<div class="pageContent">
	<form method="post" action="MacModel/OUnsuitableProdSupper.aspx?ajaxmethod=upload&UnsuitabledID=<%=UnsuitabledID %>" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone);">
		<div class="pageFormContent" layoutH="56">
            <h2></h2>
            <fieldset>
                <legend><b>供应商回复文件上传</b></legend>

                <p>
                    
                    <input type="hidden" name="SupplerReplyFilePath" id="SupplerReplyFilePath_hidden" value="<%=obj.SupplerReplyFilePath %>"/>
                    <input type="file"  name="filedata" ID="SupplerReplyFilePath_upload" uploadify="x" onUploadSuccess="onAddSupplerReplyFileUploadSuccess"/>
                </p>
                <div class="divider"></div>
                 <h2>如已上传，则在此显示</h2>
                 <p>
                    <label>已上传文件名称：</label>
                    <a href="<%=obj.SupplerReplyFilePath %>" target="_blank"  id="SupplerReplyFileName_show"  ><%=obj.SupplerReplyFileName%></a>
                    <input type="hidden" name="SupplerReplyFileName" id="SupplerReplyFileName_hidden"  value="<%=obj.SupplerReplyFileName%>" />
                 </p>
            </fieldset>
            <br/>
            <fieldset>
                <legend><b>日文版本</b></legend>
                <p>                   
                    <input type="hidden" name="ExcelJPFilePath" id="ExcelJPFilePath_hidden" value="<%=obj.ExcelJPFilePath %>"/>
                    <input type="file"  name="filedata" ID="ExcelJPFilePath_upload"  uploadify="x" onUploadSuccess="onAddExcelJPFilePathUploadSuccess"/>
                </p>
                <div class="divider"></div>
                 <h2>如已上传，则在此显示</h2>
                 <p>
                    <label>已上传文件名称：</label>
                    <a href="<%=obj.ExcelJPFilePath %>" target="_blank"  id="ExcelJPFile_show"  ><%=obj.ExcelJPFile%></a>
                    <input type="hidden" name="ExcelJPFile" id="ExcelJPFile_hidden"  value="<%=obj.ExcelJPFile%>" />
                 </p>
            </fieldset>

        </div>
        <div class="formBar">
			<ul>
				
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div></li>
				<li>
					<div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
				</li>
			</ul>
		</div>
	</form>
    <script type="text/javascript">
        function onAddSupplerReplyFileUploadSuccess(file, data, response) {
            if (!response)
                return false;
            data = eval("(" + data + ")");
            if (!data.uploadResult) {
                alert(data.errMsg);
                return;
            }
            var $imgUploadPath = data.filePath;
            var $trageId = data.customerInfo;
         
            $("#SupplerReplyFilePath_hidden").val($imgUploadPath);
            var $SupplerReplyFileName = $("#SupplerReplyFileName_hidden");
            var file = file.name;
            $SupplerReplyFileName.val(file);

        }

        function onAddExcelJPFilePathUploadSuccess(file, data, response) {
            if (!response)
                return false;
            data = eval("(" + data + ")");
            if (!data.uploadResult) {
                alert(data.errMsg);
                return;
            }
            var $imgUploadPath = data.filePath;
            var $trageId = data.customerInfo;

            $("#ExcelJPFilePath_hidden").val($imgUploadPath);
            var $SupplerReplyFileName = $("#ExcelJPFile_hidden");
            var file = file.name;
            $SupplerReplyFileName.val(file);

        }
    </script>
</div>
